
function dice20_vao_gen(gl, programInfo_cube){
	//正20面骰子
	//buffers
	const VAO_dice20 = gl.createVertexArray();
	gl.bindVertexArray(VAO_dice20);
	const VBO_dice20 = gl.createBuffer();
	gl.bindBuffer(gl.ARRAY_BUFFER, VBO_dice20);
	{
	const m = 0.52573;
	const n = 0.85065;
	let dice20 = [
		0.0, n, m, 0.0, 0.0, 0.0,	0.5, 1.0, 
		0.0, n, -m, 0.0, 0.0, 0.0,	0.25, 1.0,
		n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,

		0.0, n, m, 0.0, 0.0, 0.0,	0.5, 1.0, 
		-n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		0.0, n, -m, 0.0, 0.0, 0.0,	0.25, 1.0,
		
		0.0, n, -m, 0.0, 0.0, 0.0,	0.25, 1.0,
		-n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		-m, 0.0, -n, 0.0, 0.0, 0.0,	0.25, 0.75,
		
		0.0, n, -m, 0.0, 0.0, 0.0,	0.25, 1.0,
		-m, 0.0, -n, 0.0, 0.0, 0.0,	0.25, 0.75,
		m, 0.0, -n, 0.0, 0.0, 0.0,	0.25, 0.75,
		
		0.0, n, -m, 0.0, 0.0, 0.0,	0.25, 1.0,
		m, 0.0, -n, 0.0, 0.0, 0.0,	0.25, 0.75,
		n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		
		n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		m, 0.0, -n, 0.0, 0.0, 0.0,	0.25, 0.75,
		n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		
		n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		m, 0.0, n, 0.0, 0.0, 0.0,	0.5, 1.0, 
		
		0.0, n, m, 0.0, 0.0, 0.0,	0.5, 1.0, 
		n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		m, 0.0, n, 0.0, 0.0, 0.0,	0.25, 0.75,
		
		0.0, n, m, 0.0, 0.0, 0.0,	0.5, 1.0, 
		m, 0.0, n, 0.0, 0.0, 0.0,	0.25, 0.75,
		-m, 0.0, n, 0.0, 0.0, 0.0,	0.25, 0.75,
		
		0.0, n, m, 0.0, 0.0, 0.0,	0.5, 1.0, 
		-m, 0.0, n, 0.0, 0.0, 0.0,	0.25, 0.75,
		-n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		
		//取反
		-n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		0.0, -n, m, 0.0, 0.0, 0.0,	0.25, 1.0,
		0.0, -n, -m, 0.0, 0.0, 0.0,	0.5, 1.0, 

		0.0, -n, m, 0.0, 0.0, 0.0,	0.25, 1.0,
		n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		0.0, -n, -m, 0.0, 0.0, 0.0,	0.5, 1.0, 
		
		m, 0.0, n, 0.0, 0.0, 0.0,	0.25, 0.75,
		n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		0.0, -n, m, 0.0, 0.0, 0.0,	0.25, 1.0,
		
		-m, 0.0, n, 0.0, 0.0, 0.0,	0.25, 0.75,
		m, 0.0, n, 0.0, 0.0, 0.0,	0.25, 0.75,
		0.0, -n, m, 0.0, 0.0, 0.0,	0.25, 1.0,
			
		-n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		-m, 0.0, n, 0.0, 0.0, 0.0,	0.25, 0.75,
		0.0, -n, m, 0.0, 0.0, 0.0,	0.25, 1.0,
		
		-n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		-m, 0.0, n, 0.0, 0.0, 0.0,	0.25, 0.75,
		-n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		
		-m, 0.0, -n, 0.0, 0.0, 0.0,	0.5, 1.0, 
		-n, m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		-n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		
		-m, 0.0, -n, 0.0, 0.0, 0.0,	0.25, 0.75,
		-n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		0.0, -n, -m, 0.0, 0.0, 0.0,	0.5, 1.0, 
		
		m, 0.0, -n, 0.0, 0.0, 0.0,	0.25, 0.75,
		-m, 0.0, -n, 0.0, 0.0, 0.0,	0.25, 0.75,
		0.0, -n, -m, 0.0, 0.0, 0.0,	0.5, 1.0, 
		
		n, -m, 0.0, 0.0, 0.0, 0.0,	0.25, 0.75,
		m, 0.0, -n, 0.0, 0.0, 0.0,	0.25, 0.75,
		0.0, -n, -m, 0.0, 0.0, 0.0,	0.5, 1.0, 
	];
		
	//法向量计算
	for(let i = 0;i < 20;i += 1){
		let v1 = [
			dice20[i * 24] - dice20[i * 24 + 8],
			dice20[i * 24 + 1] - dice20[i * 24 + 8 + 1],
			dice20[i * 24 + 2] - dice20[i * 24 + 8 + 2],
		];
		
		let v2 = [
			dice20[i * 24 + 16] - dice20[i * 24 + 8],
			dice20[i * 24 + 16 + 1] - dice20[i * 24 + 8 + 1],
			dice20[i * 24 + 16 + 2] - dice20[i * 24 + 8 + 2],
		];
		
		let norm = normal_gen(v1, v2);
		
		for(let j = 0;j < 3;j += 1){
			dice20[i * 24 + j * 8 + 3] = norm[0];
			dice20[i * 24 + j * 8 + 3 + 1] = norm[1];
			dice20[i * 24 + j * 8 + 3 + 2] = norm[2];
		}
	}
	//纹理坐标计算
	for(let row = 0;row< 4;row += 1){
		for(let col = 0;col < 5;col += 1){
			let i = row * 5 + col;
			dice20[i * 24 +6] = col / 5.0;
			dice20[i * 24 +7] = (row + 1) / 5.0;
			
			dice20[i * 24 + 8 +6] = (col + 0.5) / 5.0;
			dice20[i * 24 + 8 +7] = (row + 2) / 5.0;
			
			dice20[i * 24 + 16 +6] = (col + 1) / 5.0;
			dice20[i * 24 + 16 +7] = (row + 1) / 5.0;
		}
	}
		
	gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(dice20), gl.STATIC_DRAW);
	}//顶点数据传输完成
	
	gl.vertexAttribPointer(
		programInfo_cube.attribLocations.vertexPosition,
		3,
		gl.FLOAT,
		false,
		32,
		0,
	);
	gl.vertexAttribPointer(
		programInfo_cube.attribLocations.normPosition,
		3,
		gl.FLOAT,
		false,
		32,
		12,
	);
	gl.vertexAttribPointer(
		programInfo_cube.attribLocations.coordPosition,
		2,
		gl.FLOAT,
		false,
		32,
		24,
	);
	gl.enableVertexAttribArray(programInfo_cube.attribLocations.vertexPosition);
	gl.enableVertexAttribArray(programInfo_cube.attribLocations.normPosition);
	gl.enableVertexAttribArray(programInfo_cube.attribLocations.coordPosition);
	
	return VAO_dice20;
}